package ooday02test;

public class Person {
    public String name;
    public int age;
    public String address;

    public Person() {
    }

    public Person(String name, int age, String address) {
        this.name = name;
        this.age = age;
        this.address = address;
    }
    //父类中的公共方法 eat，sleep,sayHi
    public void eat(){
        System.out.println(name+"去吃饭了");
    }
    public void sleep(){
        System.out.println(name+"去睡觉了");
    }
    public void sayHi(){
        System.out.println("大家好，我是"+name+"，今年"+age+"岁了，来自"+address);
    }
}
